package com.cjie.controller;

import com.cjie.domain.ResponseResult;
import com.cjie.domain.entity.Category;
import com.cjie.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    /**
     * 展示分类接口
     * @return
     */
    @GetMapping("/getCategoryList")
    public ResponseResult<Category> getCategoryList(){
        return categoryService.getCategoryList();
    }
}
